<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <title>Document</title>
  <style>

  </style>
</head>
<body>
<form action="">
 书名: <input type="text" name="bookname"> <br />
 作者: <input type="text" name="author"> <br />
 出版社: <input type="text" name="publisher"> <br />
 性别: <input type="radio" name="nan"> 男<br />
 性别: <input type="radio" name="nv">  女<br />
 下拉框:  <select name="address" id="">
   <option value="beijing">北京</option>
   <option value="shanghai">上海</option>
   <option value="guangzhou">广州</option>
   <option value="zhongguo">中国</option>
 </select>

</form>
<script src="./form-value.js"></script>
</body>
<script>
//准备回填的数据
let shuju = {
  bookname:'小甜瓜',
  author:'吱吱',
  publisher:'嘿嘿嘿',
  sex:'nan',
  address:'guangzhou'

}
//数据回填
//val(表单,数据)
val(document.querySelector('form'),shuju)
</script>
</html>